package io.shallwe._admin.line;

import com.jfinal.core.Controller;
import com.jfinal.validate.Validator;

public class ExitScanValidator extends Validator {

	@Override
	protected void validate(Controller c) {
		validateRequiredString("exitBuffer.rackNo", "msg", "电泳框编号不能为空");
		validateRequiredString("exitBuffer.traceCode", "msg", "追溯编号不能为空");
		validateRequiredString("exitBuffer.turnoverVehicleNo", "msg", "周转车编号不能为空");
		
		setShortCircuit(true);
	}

	@Override
	protected void handleError(Controller c) {
		c.setAttr("state", "fail");
		c.renderJson();
	}

}
